/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package hu.rsc.feeds.client.data;

import java.io.Serializable;

import com.google.gwt.user.client.rpc.IsSerializable;

/**
 * 
 * @author arbuckle
 */
public class Feed implements IsSerializable, Serializable {
    public static final String PROP_LABEL = "label";
    public static final String PROP_URL = "url";
    public static final String PROP_CATEGORY = "category";
    public static final String PROP_LANGUAGE = "language";
    public static final String PROP_DESCRIPTION = "description";
    public static final String PROP_OFFER_DATE = "offerdate";
    public static final String PROP_OFFER_OFFERER = "offerer";

    private Long id;
    private String label;
    private String url;
    private Long category;
    private String language;
    private String description;
    private Long offerer;

    public Feed() {
    }

    @Override
    public boolean equals(Object obj) {
	if (this == obj) {
	    return true;
	}
	if (obj == null) {
	    return false;
	}
	if (getClass() != obj.getClass()) {
	    return false;
	}
	Feed other = (Feed) obj;
	if (this.id == null) {
	    if (other.id != null) {
		return false;
	    }
	} else if (!this.id.equals(other.id)) {
	    return false;
	}
	return true;
    }

    public Long getCategory() {
	return this.category;
    }

    public String getDescription() {
	return this.description;
    }

    public Long getId() {
	return this.id;
    }

    public String getLabel() {
	return this.label;
    }

    public String getLanguage() {
	return this.language;
    }

    public Long getOfferer() {
	return this.offerer;
    }

    public String getUrl() {
	return this.url;
    }

    @Override
    public int hashCode() {
	final int prime = 31;
	int result = 1;
	result = prime * result + ((this.id == null) ? 0 : this.id.hashCode());
	return result;
    }

    public void setCategory(Long category) {
	this.category = category;
    }

    public void setDescription(String description) {
	this.description = description;
    }

    public void setId(Long id) {
	this.id = id;
    }

    public void setLabel(String label) {
	this.label = label;
    }

    public void setLanguage(String language) {
	this.language = language;
    }

    public void setOfferer(Long offerer) {
	this.offerer = offerer;
    }

    public void setUrl(String url) {
	this.url = url;
    }

}
